package com.control.qct.businesssteward.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.control.qct.businesssteward.R;
import com.control.qct.businesssteward.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 调货详情
 * Created by Administrator on 2018/1/30 0030.
 */

public class TheCargoDetailActivity extends BaseActivity {
    @BindView(R.id.iv_goods_picture)
    ImageView mIvGoodsPicture;//商品图片
    @BindView(R.id.tv_goods_name)
    TextView mTvGoodsName;//商品名称
    @BindView(R.id.tv_goods_barcode)
    TextView mTvGoodsBarcode;//商品条码
    @BindView(R.id.tv_goods_inventory)
    TextView mTvGoodsInventory;//库存
    @BindView(R.id.tv_the_cargo)
    TextView mTvTheCargo;//调拨者
    @BindView(R.id.tv_the_cargo_date)
    TextView mTvTheCargoDate;//调拨日期
    @BindView(R.id.tv_the_cargo_num)
    TextView mTvTheCargoNum;//调拨数量
    @BindView(R.id.tv_the_cargo_status)
    TextView mTvTheCargoStatus;//调拨状态
    @BindView(R.id.tv_agree_the_cargo)
    TextView mTvAgreeTheCargo;//同意调拨
    @BindView(R.id.tv_reject_the_cargo)
    TextView mTvRejectTheCargo;//取消申请 / 拒绝挑拨

    private int mId;

    public TheCargoDetailActivity() {
        super(R.layout.activity_the_cargo_detail);
    }

    @Override
    protected void getBundleExtras(Bundle extras) {
        super.getBundleExtras(extras);
        mId = extras.getInt("id");
    }

    @Override
    protected void initView() {
        setLeftIcon(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        setTitle("调拨详情");
        mTvAgreeTheCargo.setVisibility(mId == 1 ? View.GONE : View.VISIBLE);
        mTvRejectTheCargo.setText(mId == 1 ? "取消申请" : "拒绝");
    }

    @OnClick({R.id.tv_agree_the_cargo, R.id.tv_reject_the_cargo})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_agree_the_cargo:
                break;
            case R.id.tv_reject_the_cargo:
                break;
        }
    }
}
